
import Helper from 'source/mixins/helper.mixin'

const Image = require('../plugins/image.plugin');

module.exports = {
    imageChoose: Image.choose,
    imagePreview (options) {
        return Helper.helperFnPromise('previewImage', options);
    },
    imageDownload (options) {
        if (typeof options === 'string') {
            options = { src: options }
        }
        return Helper.helperFnPromise('getImageInfo', options);
    },
    imageSave: Image.save,
};
